import http from '../index';

export const getAll = () => http({
    url: '/api/departments',
    method: 'get',
})
export const addDepartment = (data) => http({
    url: '/api/departments',
    method: 'post',
    data
})
export const delDepartment = (params) => http({
    url: '/api/departments/' + params,
    method: 'delete'
})
export const updataDepartments = (params, data) => http({
    url: '/api/departments/' + params,
    method: 'put',
    data
})